The
PDM2PCM library has the function to decimate and filter out a
Pulse Density Modulated (PDM) stream from a digital microphone,
in order to convert it to a Pulse Code Modulated (PCM) signal
output stream.
The
PCM output stream is implemented at a sampling rate of 16kHz with a 16 bits
resolution. Various decimation factors can be configured, in order to adapt
to various PDM clocks.
Digital
microphone gain is configurable at any time and allows 1dB step in the range
of -12dB to +51dB.
Update
History
V3.2.0 / 06-November-2019
Main Changes
- Add new PDM Filter libraries compliant with GCC version with FPU = softfp
- libPDMFilter_CM4_GCC_wc32_softfp.a for GCC with wchar = 4
- libPDMFilter_CM7_GCC_wc32_softfp.a for GCC with wchar = 4
- libPDMFilter_CM4_GCC_wc16_softfp.a for GCC with wchar = 2
- libPDMFilter_CM7_GCC_wc16_softfp.a for GCC with wchar = 2
- Add new PDM Filter libraries compliant with GCC version with wchar = 2
- libPDMFilter_CM3_GCC_wc16.a
- libPDMFilter_CM4_GCC_wc16.a
- libPDMFilter_CM7_GCC_wc16.a
- This PDM Filter libraries cortexM3 version
is not backward compatible with previous V3.1.0 and earlier version,
below the list of complete changes requiring updates on User applications:
- libPDMFilter_CM3_IAR.a updated and renamed to:
- libPDMFilter_CM3_IAR_wc32.a for EWARM V8.x and later versions
- libPDMFilter_CM3_IAR_wc16.a for EWARM V7.80.x and earlier versions
- libPDMFilter_CM3_Keil.lib updated and renamed to libPDMFilter_CM3_Keil_wc16.lib
- libPDMFilter_CM3_GCC.a updated and renamed to libPDMFilter_CM3_GCC_wc32.a
V3.1.0 / 29-September-2018
Main Changes
- Update PDM Filter libraries for CortexM7 (CM7) and cortexM4 (CM4) core versions.
- This version
is not backward compatible with previous V3.0.1 and earlier version,
below the list of complete changes requiring updates on User applications:
- libPDMFilter_CM4_IAR.a updated and renamed to:
- libPDMFilter_CM4_IAR_wc32.a for EWARM V8.x and later versions
- libPDMFilter_CM4_IAR_wc16.a for EWARM V7.80.x and earlier versions
- libPDMFilter_CM4_Keil.lib updated and renamed to libPDMFilter_CM4_Keil_wc16.lib
- libPDMFilter_CM4_GCC.a updated and renamed to libPDMFilter_CM4_GCC_wc32.a
- For cortexM7 (CM7):
- libPDMFilter_CM7_IAR.a updated and renamed to:
- libPDMFilter_CM7_IAR_wc32.a for EWARM V8.x and later versions
- libPDMFilter_CM7_IAR_wc16.a for EWARM V7.80.x and earlier versions
- libPDMFilter_CM7_Keil.lib updated and renamed to libPDMFilter_CM7_Keil_wc16.lib
- libPDMFilter_CM7_GCC.a updated and renamed to libPDMFilter_CM7_GCC_wc32.
Note: New CM7 libs support both CortexM7 core versions for STM32F7 and STM32H7 seriesV3.0.1 / 29-December-2017
Main Changes
- Update libPDMFilter_CM7_Keil.lib to support CortexM7 (CM7) core version available on STM32F7 family.
Known
Limitations
- The new libPDMFilter_CM7_Keil.lib supports only CortexM7 core version available on STM32F7 family. New version for libPDMFilter_CM7_Keil.lib supporting both CortexM7 core versions (STM32F7 and STM32H7) will be available for next release.
- The libPDMFilter_CM7_Keil.lib
compatible with CortexM7 core version available on STM32H7 family is
available on PDM Lib version V3.0.0
V3.0.0 / 28-February-2017
Main Changes
- Major APIs
change
- Only one filtering function is provided PDM_Filter()
- The
decimation factor, endianness, and bit order are now configured once
at the PDM_Filter_Init() function call
- Decimation factor, demodulation
loop size and digital gain can be changed on-the-fly using PDM_Filter_setConfig() function
- This version
is not backward compatible with previous V2.1.0 and earlier version,
below guidelines on how to use the new APIs
Library initialization
Once
the memory is allocated, some routines must be called to initialize the
PDM2PCM library static memory:
- PDM_Filter_Init()
routine should be called each time the processing in the audio is
stopped and started.
- PDM_Filter_setConfig()
routine should be called at least once before processing start in
order to set configurable parameter
Furthermore,
has the PDM2PCM library runs on STM32 devices, CRC HW block must be enabled
and reset.
Module
execution
The
run time process can start, when the hardware is configured and the PDM2PCM
library is initialized and configured. At each new interrupt, when enough
bits have been buffered, the PDM2PCM filter routine PDM_Filter() can be
called. Between two consecutive calls to this filter routine, the dynamic
parameters can be changed.
V2.1.0 / 31-March-2015
Main Changes
- Add Binaries
for CortexM7 (CM7) core
- PDM_Filter_128_MSB() and PDM_Filter_128_LSB()
functions: enhance volume setting, it was lower than expected
- PDM_Filter_64_MSB() function:
fix issue when using more than 2 microphones
V2.0.1 / 17-December-2013
Main Changes
- In HTONS()
macro, change u16 type by uint16_t
V2.0.0 / 07-August-2013
Main Changes
- Update
Library binary name format
- Add Library
version optimized for CM0, CM3 and CM4F cores
- Add functions
for decimation factor 128
V1.1.2 / 17-April-2012
Main Changes
- All source
files: license disclaimer text update and add link to the License
file on ST Internet.
V1.1.1 / 30-December-2011
Main Changes
- PDM Library
moved from Utilities\STM32F4-Discovery to Utilities\STM32_Audio\Addons\PDM folder
- Add
new license agreement "MCD-ST Image SW License Agreement
V2.pdf"
V1.1.0 / 28-October-2011
Main Changes
- Add PDM
audio software decoding Library drivers, used to decode and
reconstruct the audio signal produced by MP45DT02 MEMS microphone
from STMicroelectronics. For more
details about this Library, please refer to document "PDM
audio software decoding on STM32 microcontrollers (AN3998)".
- stm32f4_discovery_audio_codec.c/.h:
update to use DMA instead of Interrupt in I2S communication with the
external codec.
V1.0.0 / 19-September-2011
Main Changes
- First
official version of the STM32F4-Discovery Board Drivers
License
Licensed under MCD-ST
Image SW License Agreement V2, (the "License"); You may not use
this package except in compliance with the License. You may obtain a
copy of the License at:
http://www.st.com/software_license_agreement_image_v2
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For
complete documentation on STM32 Microcontrollers
visit www.st.com/STM32
|